package com.tlsy.commerce.model.multiTenant;

import com.tlsy.commerce.model.IdEntity;
import com.tlsy.commerce.multi_tenant.TenantHolder;
import lombok.Getter;
import lombok.Setter;
import org.eclipse.persistence.annotations.Multitenant;
import org.eclipse.persistence.annotations.TenantDiscriminatorColumn;

import javax.persistence.*;

/**
 * 订单
 * @author Tlsy
 * @version commerce 0.0.1
 * @date 2017/4/13  14:22
 */
@Entity
@Table(name = "orders")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@Getter
@Setter
@Multitenant
@TenantDiscriminatorColumn(name = "user_id", length=42, contextProperty = TenantHolder.TENANT_ID)
@DiscriminatorColumn(name = "order_type")
public abstract class Orders extends IdEntity{
    private static final long serialVersionUID = 5539315866794743762L;
}
